package com.xyh.educms.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xyh.commonutils.R;
import com.xyh.educms.entity.CrmBanner;
import com.xyh.educms.service.CrmBannerService;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * 前台 banner 显示
 */
@RestController
@RequestMapping("/educms/bannerfront")
//@CrossOrigin
public class BannerFrontController {
    @Resource
    private CrmBannerService crmBannerService;

    @GetMapping("/getAllBanner")
    public R getAllBanner(){
        List<CrmBanner> list = crmBannerService.selectAllBanner();
        return R.ok().data("list",list);
    }

}
